package model;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import javafx.beans.property.SimpleStringProperty;

/**
 *
 * @author Merli András-Bertalan
 */
public class Table {

    private final SimpleStringProperty name;
    private List<Attribute> attributes;
    private List<List<String>> values;

    public Table(String name, List<Attribute> attributes) {
        this.name = new SimpleStringProperty(name);
        this.attributes = attributes;
        this.values = new ArrayList();
        
    }

    public String getName() {
        return name.get();
    }

    public void setName(String fName) {
        name.set(fName);
    }

    public List<Attribute> getAttributes() {
        if (attributes == null) {
            attributes = new LinkedList<>();
        }
        return attributes;
    }

    public void setAttributes(List<Attribute> attributes) {
        this.attributes = attributes;
    }

    public List<List<String>> getValues() {
        return values;
    }

    public void setValues(List<List<String>> values) {
        this.values = values;
    }
}
